<?php
/**
 * 公众号页面授权接口
 * @author lss
 * 2017-03-02
 */
namespace soa\mp;

use soa\client;

class Binding  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	/**
	 * c用户获取绑定信息
	 * @param int $user_id
	 * @return bool|null
	 */
	public function cGet($user_id){
		return $this->post("api/Binding/cGet",[
			"userId" => $user_id,
			"all" => 1,
		]);
	}

	//根据用户手机号获取绑定关系
	public function cGetByMobile($username,$platform){
		return $this->post("api/Binding/cGet",[
			"mobile" => $username,
			"platform" => $platform,
		]);
	}
}